{extend name='Public:content'/}
{block name='title'}用户管理{/block}
{block name='content'}
<div class="row animated fadeIn">
    <div class="row">
        <div class="col-md-8">
            <div class="panel panel-default tabs">
                <ul class="nav nav-tabs" role="tablist">
                    <li class="active"><a href="#tab-first" role="tab" data-toggle="tab">用户列表
                        <button class="btn btn-success btn-rounded btn-sm">{$num}</button>
                    </a></li>
                    <!--<li><a href="#tab-second" role="tab" data-toggle="tab">用户添加</a></li>-->
                </ul>
                <div class="panel-body tab-content">
                    <div class="active tab-pane" id="tab-first">
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th>登陆名</th>
                                <th>昵称</th>
                                <th>头像</th>
                                <th>登录次数</th>
                                <th>注册时间</th>
                                <th>最近登录IP</th>
                                <th>最近登录时间</th>
                                <th>状态</th>
                                <th></th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name='list' id='vo'}
                            <tr class="del_tr">
                                <td>{$vo.username}</td>
                                <td>{$vo.name}</td>
                                <td  style="background: url('{$vo.head_portrait|is_img}');background-size: contain;background-repeat: no-repeat;"></td>
                                <td><span class="label label-danger">{$vo.user_hits}</span></td>
                                <td>{$vo.create_time|tranTime}</td>
                                <td>{$vo.last_login_ip}</td>
                                <td>{$vo.last_login_time|tranTime}</td>
                                <td>{$vo.status|is_stop}</td>
                                <td>
                                    {if condition='$vo.id eq 1'}
                                    {if condition='open_secret($Think.cookie.UID) neq 1'}
                                    <a disabled title="【编辑】"  class="btn btn-default btn-rounded btn-sm"><span class="fa fa-pencil"></span></a>
                                    {else/}
                                    <a title="编辑】" data-url="{:url('admin/shops/edit',['id'=>$vo.id])}" onclick="edit_row(this)"  class="btn btn-default btn-rounded btn-sm"><span class="fa fa-pencil"></span></a>
                                    {/if}
                                    <button disabled class="btn btn-danger btn-rounded btn-sm" ><span class="fa fa-trash-o"></span></button>
                                    {else/}
                                    <a title="【编辑】" data-url="{:url('admin/shops/edit',['id'=>$vo.id])}" onclick="edit_row(this)"  class="btn btn-default btn-rounded btn-sm"><span class="fa fa-pencil"></span></a>
                                    <button data-url="{:url('admin/shops/del_think',['id'=>$vo.id])}" onClick="delete_row(this);" class="btn btn-danger btn-rounded btn-sm" ><span class="fa fa-trash-o"></span></button>
                                    {/if}
                                </td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                        {$page}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
</script>
{/block}